package com.nightsoul.javawebsocket.test;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.webapp.WebAppContext;

public class Launcher {

	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {
		String userDir = System.getProperty("user.dir");
		String webApp = userDir + "\\src\\main\\webapp";
		Server server = new Server(8080);
		WebAppContext context = new WebAppContext(webApp, "/chat");
		String defaultsDescriptor = Launcher.class.getResource("/webdefault.xml").getFile();
		context.setDefaultsDescriptor(defaultsDescriptor);
		server.setHandler(context);
		
		server.start();
		server.join();
	}

}
